import request from "@/request/api";

//系统管理页面
//数据字典页面
//1、数据字典分类树接口
export function dataDictTreeData(data) {
  return request({
    url: "/eam-service-system/sys/DataDictClassify/getDictionaryClassifyList",
    method: "get",
    params: data,
  });
}
//2、数据字典分类树增加节点接口
export function dataDictTreeAdd(data) {
  return request({
    url: "/eam-service-system/sys/DataDictClassify",
    method: "post",
    data: data,
  });
}
//3、数据字典分类树修改节点接口
export function dataDictTreeEdit(data) {
  return request({
    url: "/eam-service-system/sys/DataDictClassify",
    method: "put",
    data: data,
  });
}
//4、数据字典分类树删除节点接口
export function dataDictTreeDelete(data) {
  return request({
    url: "/eam-service-system/sys/DataDictClassify",
    method: "delete",
    params: data,
  });
}

//数据字典父表格所有接口
//1、获取父表格所有数据
export function getDictionaryList(data) {
  return request({
    url: "/eam-service-system/sys/DataDict/getDictionaryList",
    method: "post",
    data: data,
  });
}
//2、父表格数字添加
export function addDictionary(data) {
  return request({
    url: "/eam-service-system/sys/DataDict",
    method: "post",
    data: data,
  });
}
//3、父表格数字编辑
export function editDictionary(data) {
  return request({
    url: "/eam-service-system/sys/DataDict",
    method: "put",
    data: data,
  });
}
//4、父表格数字删除
export function deleteDictionary(data) {
  return request({
    url: "/eam-service-system/sys/DataDict",
    method: "delete",
    params: data,
  });
}
//数据字典子表格所有接口
//1、根据id和水司查询所有字典详情
export function sonTableAll(data) {
  return request({
    url:
      "/eam-service-system/sys/DataDictDetail/getDetailsByDictionaryAndAppId",
    method: "get",
    params: data,
  });
}
//2、子表格数字添加
export function sonTableAdd(data) {
  return request({
    url: "/eam-service-system/sys/DataDictDetail",
    method: "post",
    data: data,
  });
}
//3、子表格数字编辑
export function sonTableEdit(data) {
  return request({
    url: "/eam-service-system/sys/DataDictDetail",
    method: "put",
    data: data,
  });
}
//4、子表格数字删除
export function sonTableDelete(data) {
  return request({
    url: "/eam-service-system/sys/DataDictDetail",
    method: "delete",
    params: data,
  });
}

/**
 * 配置项接口
 */
//查询配置分类列表
export function getConfigList(data) {
  return request({
    url: "/eam-service-system/sys/ConfigType/getListAndPaging",
    method: "get",
    params: data,
  });
}
//新增配置分类
export function addConfigType(data) {
  return request({
    url: "/eam-service-system/sys/ConfigType/insert",
    method: "post",
    data: data,
  });
}
//修改配置分类
export function updateConfigType(data) {
  return request({
    url: "/eam-service-system/sys/ConfigType/update",
    method: "put",
    data: data,
  });
}
//删除配置分类
export function deleteConfigType(data) {
  return request({
    url: "/eam-service-system/sys/ConfigType/delete",
    method: "delete",
    params: data,
  });
}


//查询配置详情列表
export function getConfigDetailList(data) {
  return request({
    url: "/eam-service-system/sys/ConfigDetail/getList",
    method: "get",
    params: data,
  });
}
//新增配置详情
export function addConfigDetail(data) {
  return request({
    url: "/eam-service-system/sys/ConfigDetail/insert",
    method: "post",
    data: data,
  });
}
//修改配置详情
export function updateConfigDetail(data) {
  return request({
    url: "/eam-service-system/sys/ConfigDetail/update",
    method: "put",
    data: data,
  });
}
//删除配置详情
export function deleteConfigDetail(data) {
  return request({
    url: "/eam-service-system/sys/ConfigDetail/delete",
    method: "delete",
    params: data,
  });
}